package com.canaan.business.domain.invoice;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.canaan.common.annotation.Excel;
import com.canaan.common.annotation.TableName;
import com.canaan.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * 生产入库申请单对象 wms_pro_stock_apply
 *
 * @author ruoyi
 * @date 2022-12-19
 */
@Data
@ApiModel(description = "wms_pro_stock_apply")
@TableName("wms_pro_stock_apply")
public class WmsProStockApply extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 编号 */
    @Excel(name = "申请单编号")
    @ApiModelProperty("申请单编号")
    private String no;

    /** 申请状态 1新建 2进行中 */
    @Excel(name = "申请状态", dictType = "invoice_pro_stock_apply_status")
    @ApiModelProperty("申请状态 1新建 2进行中")
    private Integer orderStatus;

    /** 工单编号 */
//    @Excel(name = "工单编号")
    @ApiModelProperty("工单编号")
    private String workOrderNo;

    /** 完成时间 */
    @ApiModelProperty("完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date completeTime;

    /** 申请人 */
    @Excel(name = "申请人")
    @ApiModelProperty("申请人")
    private String applicant;

    /** 区域 */
    @Excel(name = "区域")
    @ApiModelProperty("区域")
    private String area;

    /** 入库申请总数 */
    @Excel(name = "入库申请总数")
    @ApiModelProperty("入库申请总数")
    private Long totalOrderQty;

    /** 实际入库总数 */
    @ApiModelProperty("实际入库总数")
    @Excel(name = "实际入库总数")
    private Long totalActualQty;

    /** 排序 */
//    @Excel(name = "排序")
    @ApiModelProperty("排序")
    private Integer sort;

    /** 是否删除：1是 0否 */
    @ApiModelProperty("是否删除：1是 0否 ")
    private String delFlag;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createBy;

    /** 创建时间 */
    @Excel(name = "创建时间", type = Excel.Type.EXPORT, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新人 */
    @Excel(name = "更新人")
    private String updateBy;

    /** 更新时间 */
    @Excel(name = "最后更新时间", type = Excel.Type.EXPORT, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty("物料申请清单集合")
    private List<WmsProStockApplyDetail> proStockApplyDetails;


    /** 线边仓 */
    @Excel(name = "线边仓")
    @ApiModelProperty("线边仓")
    private String storehouseNo;

    /** 线边仓名称 */
    @Excel(name = "线边仓名称")
    @ApiModelProperty("线边仓名称")
    private String storehouseName;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("no", getNo())
            .append("orderStatus", getOrderStatus())
            .append("workOrderNo", getWorkOrderNo())
            .append("completeTime", getCompleteTime())
            .append("applicant", getApplicant())
            .append("area", getArea())
            .append("totalOrderQty", getTotalOrderQty())
            .append("totalActualQty", getTotalActualQty())
            .append("sort", getSort())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    private List<Long> ids;

    public List<Long> getIds() {
        return ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }
}
